Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@pestopancake
pestopancake / FormatNumberFilter.js
Last active May 27, 2026 15:49
vue js format number - decimals and thousands separator
Vue.filter('formatNumber', function (value, decimals = 2, thousandsSeparator = ',') {
let result = parseFloat(value).toFixed(decimals).toString();
if(thousandsSeparator) result = result.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator)
return result
});
@jboner
jboner / latency.txt
Last active May 27, 2026 15:48
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@Killeroid
Killeroid / gpg-import-and-export-instructions.md
Created October 18, 2017 11:51
How to export and import gpg keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Gotten from the RedHat GPG migration manual

Backup the public and secret keyrings and trust database

## Export all public keys

gpg -a --export >mypubkeys.asc

@wavezhang
wavezhang / java_download.sh
Last active May 27, 2026 15:47
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@joelpob
joelpob / kindle_highlights.py
Created June 21, 2018 17:49
Kindle highlights scraper
# pip install these packages
# splinter bs4 lxml
# tested on python3
from splinter import Browser
from bs4 import BeautifulSoup
import json
browser = Browser('chrome')
browser.visit('https://read.amazon.com/kp/notebook')
@wsargent
wsargent / docker_cheat.md
Last active May 27, 2026 15:46
Docker cheat sheet
@soheilhy
soheilhy / nginxproxy.md
Last active May 27, 2026 15:45
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@GabrielVidal1
GabrielVidal1 / django-git-switch-migrate.sh
Created October 16, 2025 23:18
Automatic django migration handling for git workflow
#!/bin/bash
# ==============================================================================
# Git Branch Switch with Safe Django Migrations
# ==============================================================================
# This script automates switching between Git branches in a Django project
# while handling database migrations safely.
#
# It:
# - Compares Django migrations between the current and target branches.
# - Reverts apps to the last common migration if migrations diverged.